package com.ydlclass.loadbalancer.LoadBalanceImpl;

import com.ydlclass.loadbalancer.AbstractLoadBalance;
import com.ydlclass.loadbalancer.Selector;
import com.ydlclass.loadbalancer.SelectorImpl.ConsistentHashSelector;

import java.net.InetSocketAddress;
import java.util.List;

/**
 * 一致性hash
 * @Author duWenJian
 * @Date 2024/2/26 12:48
 * @Version 1.0
 */
public class ConsistentHashBalance extends AbstractLoadBalance {
    @Override
    protected Selector getSelector(List<InetSocketAddress> socketAddressList) {
        ConsistentHashSelector selector = new ConsistentHashSelector(socketAddressList,128);
        return selector;
    }
}
